package com.bonc.modules.rpt.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.bonc.datasource.annotation.DataSource;
import com.bonc.factory.PageFactory;
import com.bonc.modules.rpt.dao.ComplainSatisfationDeptDao;
import com.bonc.modules.rpt.entity.ComplainSatisfactionDeptEntity;
import com.bonc.modules.rpt.param.FixParam;
import com.bonc.modules.rpt.service.FixService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author jinlong
 * @date 2021/7/30
 */
@Service("cmpSatisDeptNormal")
@DataSource("data")
public class CmpSatisDeptNormalServiceImpl implements FixService {

    @Autowired
    private ComplainSatisfationDeptDao complainSatisfationDeptDao;

    @Override
    public String getMaxDate() {
        return complainSatisfationDeptDao.getMaxMonth();
    }

    @Override
    public Page<ComplainSatisfactionDeptEntity> queryPage(FixParam fixParam) {
        return complainSatisfationDeptDao.page(PageFactory.defaultPage(), fixParam);
    }

    @Override
    public List<ComplainSatisfactionDeptEntity> queryData(FixParam fixParam) {
        return complainSatisfationDeptDao.list(fixParam);
    }

}
